<?php


namespace Yeepay\Yop\Sdk\Service\Divide;


use Yeepay\Yop\Sdk\Client\ClientExecutionParams;
use Yeepay\Yop\Sdk\Client\ClientHandler;
use Yeepay\Yop\Sdk\Client\ClientParams;
use Yeepay\Yop\Sdk\Exception\YopClientException;
use Yeepay\Yop\Sdk\Service\Divide\Model as Model;

class DivideClient
{
    /**
     * @var ClientHandler
     */
    private $clientHandler;

    /**
     * DivideClient constructor.
     * @param ClientParams $clientParams
     */
    function __construct(ClientParams $clientParams)
    {
        $this->clientHandler = new ClientHandler($clientParams);
    }

    /**
     * @param Model\ApplyRequest $request
     * @return Model\ApplyResponse
     * @throws YopClientException
     */
    public function apply(Model\ApplyRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\ApplyRequestMarshaller::getInstance(),
            Model\ApplyResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\ApplyV10Request $request
     * @return Model\ApplyV10Response
     * @throws YopClientException
     */
    public function apply_v1_0(Model\ApplyV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\ApplyV10RequestMarshaller::getInstance(),
            Model\ApplyV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BackRequest $request
     * @return Model\BackResponse
     * @throws YopClientException
     */
    public function back(Model\BackRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BackRequestMarshaller::getInstance(),
            Model\BackResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BackApplyRequest $request
     * @return Model\BackApplyResponse
     * @throws YopClientException
     */
    public function backApply(Model\BackApplyRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BackApplyRequestMarshaller::getInstance(),
            Model\BackApplyResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BackQueryRequest $request
     * @return Model\BackQueryResponse
     * @throws YopClientException
     */
    public function backQuery(Model\BackQueryRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BackQueryRequestMarshaller::getInstance(),
            Model\BackQueryResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BackReceiptDownloadRequest $request
     * @return Model\BackReceiptDownloadResponse
     * @throws YopClientException
     */
    public function backReceiptDownload(Model\BackReceiptDownloadRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BackReceiptDownloadRequestMarshaller::getInstance(),
            Model\BackReceiptDownloadResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BackQueryV10Request $request
     * @return Model\BackQueryV10Response
     * @throws YopClientException
     */
    public function back_query_v1_0(Model\BackQueryV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BackQueryV10RequestMarshaller::getInstance(),
            Model\BackQueryV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BackReceiptDownloadV10Request $request
     * @return Model\BackReceiptDownloadV10Response
     * @throws YopClientException
     */
    public function back_receipt_download_v1_0(Model\BackReceiptDownloadV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BackReceiptDownloadV10RequestMarshaller::getInstance(),
            Model\BackReceiptDownloadV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BackV10Request $request
     * @return Model\BackV10Response
     * @throws YopClientException
     */
    public function back_v1_0(Model\BackV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BackV10RequestMarshaller::getInstance(),
            Model\BackV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceApplyRequest $request
     * @return Model\BalanceApplyResponse
     * @throws YopClientException
     */
    public function balanceApply(Model\BalanceApplyRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceApplyRequestMarshaller::getInstance(),
            Model\BalanceApplyResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceBackQueryRequest $request
     * @return Model\BalanceBackQueryResponse
     * @throws YopClientException
     */
    public function balanceBackQuery(Model\BalanceBackQueryRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceBackQueryRequestMarshaller::getInstance(),
            Model\BalanceBackQueryResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceQueryRequest $request
     * @return Model\BalanceQueryResponse
     * @throws YopClientException
     */
    public function balanceQuery(Model\BalanceQueryRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceQueryRequestMarshaller::getInstance(),
            Model\BalanceQueryResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceReceiptRequest $request
     * @return Model\BalanceReceiptResponse
     * @throws YopClientException
     */
    public function balanceReceipt(Model\BalanceReceiptRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceReceiptRequestMarshaller::getInstance(),
            Model\BalanceReceiptResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceApplyV10Request $request
     * @return Model\BalanceApplyV10Response
     * @throws YopClientException
     */
    public function balance_apply_v1_0(Model\BalanceApplyV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceApplyV10RequestMarshaller::getInstance(),
            Model\BalanceApplyV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceDivideBackApplyV10Request $request
     * @return Model\BalanceDivideBackApplyV10Response
     * @throws YopClientException
     */
    public function balance_divide_back_apply_v1_0(Model\BalanceDivideBackApplyV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceDivideBackApplyV10RequestMarshaller::getInstance(),
            Model\BalanceDivideBackApplyV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceDivideBackQueryV10Request $request
     * @return Model\BalanceDivideBackQueryV10Response
     * @throws YopClientException
     */
    public function balance_divide_back_query_v1_0(Model\BalanceDivideBackQueryV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceDivideBackQueryV10RequestMarshaller::getInstance(),
            Model\BalanceDivideBackQueryV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceDivideBackReceiptV10Request $request
     * @return Model\BalanceDivideBackReceiptV10Response
     * @throws YopClientException
     */
    public function balance_divide_back_receipt_v1_0(Model\BalanceDivideBackReceiptV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceDivideBackReceiptV10RequestMarshaller::getInstance(),
            Model\BalanceDivideBackReceiptV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceDivideReceiptV10Request $request
     * @return Model\BalanceDivideReceiptV10Response
     * @throws YopClientException
     */
    public function balance_divide_receipt_v1_0(Model\BalanceDivideReceiptV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceDivideReceiptV10RequestMarshaller::getInstance(),
            Model\BalanceDivideReceiptV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\BalanceQueryV10Request $request
     * @return Model\BalanceQueryV10Response
     * @throws YopClientException
     */
    public function balance_query_v1_0(Model\BalanceQueryV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\BalanceQueryV10RequestMarshaller::getInstance(),
            Model\BalanceQueryV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\CompleteRequest $request
     * @return Model\CompleteResponse
     * @throws YopClientException
     */
    public function complete(Model\CompleteRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\CompleteRequestMarshaller::getInstance(),
            Model\CompleteResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\CompleteV10Request $request
     * @return Model\CompleteV10Response
     * @throws YopClientException
     */
    public function complete_v1_0(Model\CompleteV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\CompleteV10RequestMarshaller::getInstance(),
            Model\CompleteV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\DivideRequest $request
     * @return Model\DivideResponse
     * @throws YopClientException
     */
    public function divide(Model\DivideRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\DivideRequestMarshaller::getInstance(),
            Model\DivideResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\DivideQueryRequest $request
     * @return Model\DivideQueryResponse
     * @throws YopClientException
     */
    public function divideQuery(Model\DivideQueryRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\DivideQueryRequestMarshaller::getInstance(),
            Model\DivideQueryResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\DivideQueryV10Request $request
     * @return Model\DivideQueryV10Response
     * @throws YopClientException
     */
    public function divide_query_v1_0(Model\DivideQueryV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\DivideQueryV10RequestMarshaller::getInstance(),
            Model\DivideQueryV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\DivideV10Request $request
     * @return Model\DivideV10Response
     * @throws YopClientException
     */
    public function divide_v1_0(Model\DivideV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\DivideV10RequestMarshaller::getInstance(),
            Model\DivideV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\DividebackRequest $request
     * @return Model\DividebackResponse
     * @throws YopClientException
     */
    public function divideback(Model\DividebackRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\DividebackRequestMarshaller::getInstance(),
            Model\DividebackResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\DividebackQueryRequest $request
     * @return Model\DividebackQueryResponse
     * @throws YopClientException
     */
    public function dividebackQuery(Model\DividebackQueryRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\DividebackQueryRequestMarshaller::getInstance(),
            Model\DividebackQueryResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\DividebackQueryV10Request $request
     * @return Model\DividebackQueryV10Response
     * @throws YopClientException
     */
    public function divideback_query_v1_0(Model\DividebackQueryV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\DividebackQueryV10RequestMarshaller::getInstance(),
            Model\DividebackQueryV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\DividebackV10Request $request
     * @return Model\DividebackV10Response
     * @throws YopClientException
     */
    public function divideback_v1_0(Model\DividebackV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\DividebackV10RequestMarshaller::getInstance(),
            Model\DividebackV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\QueryRequest $request
     * @return Model\QueryResponse
     * @throws YopClientException
     */
    public function query(Model\QueryRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\QueryRequestMarshaller::getInstance(),
            Model\QueryResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\QueryV10Request $request
     * @return Model\QueryV10Response
     * @throws YopClientException
     */
    public function query_v1_0(Model\QueryV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\QueryV10RequestMarshaller::getInstance(),
            Model\QueryV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\ReceiptDivideBackRequest $request
     * @return Model\ReceiptDivideBackResponse
     * @throws YopClientException
     */
    public function receiptDivideBack(Model\ReceiptDivideBackRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\ReceiptDivideBackRequestMarshaller::getInstance(),
            Model\ReceiptDivideBackResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\ReceiptDownloadRequest $request
     * @return Model\ReceiptDownloadResponse
     * @throws YopClientException
     */
    public function receiptDownload(Model\ReceiptDownloadRequest $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\ReceiptDownloadRequestMarshaller::getInstance(),
            Model\ReceiptDownloadResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
    /**
     * @param Model\ReceiptDownloadV10Request $request
     * @return Model\ReceiptDownloadV10Response
     * @throws YopClientException
     */
    public function receipt_download_v1_0(Model\ReceiptDownloadV10Request $request)
    {
        if ($request == null) {
            throw new YopClientException("request is required.");
        }
        $clientExecutionParams = new ClientExecutionParams($request, Model\ReceiptDownloadV10RequestMarshaller::getInstance(),
            Model\ReceiptDownloadV10ResponseUnMarshaller::getInstance());
        return $this->clientHandler->execute($clientExecutionParams);
    }
}
